// 引入 request
import request from '@/utils/request'

// 获取验证码 API 弃用
// export const getImageCode = clientToken => request.get('/api/user-service/user/imageCode/' + clientToken)

// 获取订单数
export const getOrderAmount = data => request.get('/api/order-service/report/orderAmount', { params: data })

// 获取销售额
export const getOrderCount = data => request.get('/api/order-service/report/orderCount', { params: data })

// 获取工单
export const getTaskReportInfo = data => request.get(`/api/task-service/task/taskReportInfo/${data.start}/${data.end}`)

// 商品热榜
export const getSkuTop = data => request.get(`/api/order-service/report/skuTop/10/${data.start.split(' ')[0]}/${data.end.split(' ')[0]}`)

// 获取故障的十个设备
export const getErrorStatus10 = () => request.get('/api/status-service/status/top10')

// 获取合作商
export const getTop5Partner = () => request.get('/api/user-service/partner/count')

// 获取点位
export const getTop5Point = () => request.get('/api/vm-service/node/count')

// 获取Top5合作商
export const getTop5 = () => request.get('/api/vm-service/node/nodeCollect')

// 获取销售趋势
export const getAmountCollect = data => request.get(`/api/order-service/report/amountCollect/${data.collectType}/${data.start}/${data.end}`)

// 获取销售额分布
export const getRegionCollect = data => request.get(`/api/order-service/report/regionCollect/${data.start}/${data.end}`)
